when in2=spg then do; SFScomms=tSFScomms; HDToolBox=tHDToolBox; NewName=tNewName; call saveprefs();call top('id 'ct' s 0 ref'); end
when in2=lpg then call loadprefs()
when in2=upg then do; SFScomms=tSFScomms; HDToolBox=tHDToolBox; NewName=tNewName;call top('id 'namsg' gt "'NewName'"'); name=NewName; call top('id 'ct' s 0 ref'); end
otherwise /*say in*/ nop
end
return
help:
if in2<1 then in2=0
tx=hlp.in2
call top('id 0 s 8 gt "'tx'"')
return
xfunc:
if voln==0 then do; call req('Error',' Sorry but NO *n Device is Selected ','_Oops'); return; end
call appendir()
if in3==0 then do;if req('formatSFS',' Going to Run SFSCheck on *n Device : 'voln' ','_OK','_Cancel')==2 then return; address command 'run 'SFScomms'SFSCheck 'voln''; return; end
if in3==1 then do;if req('formatSFS',' Going to Run SFSdefragmentGUI on *n Device : 'voln' ','_OK','_Cancel')==2 then return; address command 'run >nil: 'SFScomms'SFSdefragmentGUI 'voln''; return; end
if in3==2 then do;if req('formatSFS',' Going to Run SFSQuery on *n Device : 'voln' ','_OK','_Cancel')==2 then return; address command 'run 'SFScomms'SFSQuery 'voln''; return; end
return
appendir:; lc=substr(SFScomms,length(SFScomms),1); if lc==':'|lc=='/' then return; SFScomms=''SFScomms'/'; return
formit:
/*if index(name,' ')~=0 then name='"'name'"'*/
call appendir()
cmd=''SFScomms'SFSFormat DEVICE "'voln'" NAME "'name'"'
if rcm==1 then cmd=''cmd' SHOWRECYCLED'
if rcm==2 then cmd=''cmd' NORECYCLED'
if cs==1 then cmd=''cmd' CASESENSITIVE'
if req(' Going to FORMAT !','*n OK TO RUN COMAND *n*n 'cmd' *n','_YES','_NO')==1 then;
if index(ln,'Smart Filesystem')~=0 then devs=''devs' 'word(lin,yy)': |'
end
end
end
call pragma()
OPTIONS FAILAT 10
call close(dl)
if exists('t:version')==1 then address command 'delete QUIET >nil: t:version'
if exists('t:ver')==1 then address command 'delete QUIET >nil: t:ver'
if exists('t:devlist')==1 then address command 'delete QUIET >nil: t:devlist'
nl=0
do x=1 to words(devs);l=length(word(devs,x));if l>nl then nl=l; end
nl=max(nl,6)
devs=''strip(devs,,'|')'"'
nl=nl*10;
nl=nl+25;
cl='gt "DEVICE" cl 'devs' minw 'nl''
if devs=='""' then do
cl='gt "No Devices" dis 1 cl "|"';
ans=req('FormatSFS',' FormatSFS has not found any SmartFileSystem *n partitions on you hard drive !!! *n*n as SFSFormat will only work on SFS Partitions *n you should load HDToolBox to setup your HD ','Run _HDToolbox','_Load FormatSFS','_Quit FormatSFS')
if ans==1 then call gohdt()
if ans==3 then exit
end
return
gohdt:
if ~exists(HDToolBox) then do;
req(' Error ..','ERROR...*n Couldn''t find the HDToolBox Program at *n "'HDToolBox'" *n You have to point to HDToolBox *n*n Please Show me where HDToolBox is.. ','_OK');
address command 'requestfile title "Where''s HDToolBox ?" drawer "sys:tools" >pipe:rqf'
if devs='""' then do; if pip~="" then call close(pip);exit;end
return
checksfs:
call appendir()
if ~exists(''SFScomms'SFSFormat') then do;
req(' Error ..','ERROR...*n Couldn''t find the SFSFormat Program at *n "'SFScomms'" *n You have to point to the Drawer Containing *n SFSFormat , SFSQueery ect.ect. *n*n Please Show me where the SFSCommands Are . ','_OK');
top: ; parse arg out; call writeln(pip,out); res=readln(pip); parse var res res1 res2 . ; if res1='ok' then return(res2); say 'error from: 'out; say ' responce: ' res; exit
req: ; parse arg bar,txt,g1,g2,g3,g4,g5,g6,g7 .; if rf~=0 then call close(rf);
call top('id 0 s 256')
call open(rf,'awnpipe:newhtmlreq/xc')
nxt=txt;
p=1; do while p~=0; p=index(nxt,'"',p); if P~=0 then do; nxt=insert('*',nxt,p-1);p=p+2; end; end;
call writeln(rf,'"'bar'" v it "NewHTML" sw dg db a ps 'screen'');
call writeln(rf,'space');
call writeln(rf,'layout b 5');
call writeln(rf,'space');
call writeln(rf,'label so weih 5 weiw 10 gt "*n*n'nxt'"');
call writeln(rf,'space');
call writeln(rf,'le');
call writeln(rf,'layout b 0 si so');
if g1~="" then call writeln(rf,'button gt "'g1'" close');if g2~="" then call writeln(rf,'button gt "'g2'" close');if g3~="" then call writeln(rf,'button gt "'g3'" close');if g4~="" then call writeln(rf,'button gt "'g4'" close');if g5~="" then call writeln(rf,'button gt "'g5'" close');if g6~="" then call writeln(rf,'button gt "'g6'" close');if g7~="" then call writeln(rf,'button gt "'g7'" close');
call writeln(rf,'le');
call writeln(rf,'open');call readln(rf)
do while ~eof(rf); rn=readln(rf); parse var rn rn1 rn2 rn3 rn4 rn5 .;
if rn1=='gadget' then do; call top('id 0 s 512'); return(rn2-2); end; end
call top('id 0 s 512'); return(0)
sethelp: ; hlp.ct='Goto Prefs Page'; hlp.namsg='New Volume Name' ; hlp.dng='Set as Device Name'; hlp.csg='Set Case Sensivity'; hlp.hdtg='Run HDToolBox'